package com.server.shop;

import java.util.List;
import java.util.Map;

import org.json.JSONObject;
import org.springframework.web.bind.annotation.RequestParam;

import com.config.AppReturn;

public interface ShopService {
	
	/**
	 * 查询省市区
	 * @param id 上级ID
	 * @param type 1：省，2：市，3：区
	 * @return
	 */
	public List<Map<String, Object>> getCity(String id,String type);
	
	/**
	 * 查询BANNER
	 * @param classes
	 * @return
	 */
	public List<Map<String, Object>> getBanner(String classes);
	
	/**
	 * 查询消息
	 * @return
	 */
	public List<Map<String, Object>> getNotice(String type);

	/**
	 * 根据条件查询商品
	 * @param name
	 * @param classid
	 * @return
	 */
	public List<Map<String, Object>> getGoodsList(String name,String classid,String positionid,String iftop);
	
	/**
	 * 查询商品详情
	 * @param user
	 * @param goodsid
	 * @return
	 */
	public Map<String, Object> getGoodsDetail(Map<String, Object> user ,String goodsid);
	
	/**
	 * 查询我的购物车信息
	 * @param user
	 * @return
	 */
	public AppReturn getMyCar(Map<String, Object> user);
	
	/**
	 * 查询购物车中商品信息
	 * @param user
	 * @param ids
	 * @return
	 */
	public List<Map<String, Object>> getMyCarByIds(Map<String, Object> user,String ids);
	
	/**
	 * 增加商品到购物车
	 * @param user
	 * @param goodsid
	 * @param goodsnum
	 * @return
	 */
	public AppReturn addCar(Map<String, Object> user ,String goodsid,String stockid,String goodsnum);
	
	/**
	 * 直接购买商品
	 * @param user
	 * @param id
	 * @param num
	 * @return
	 */
	public AppReturn buyGoods(Map<String, Object> user , String goodsid,String stockid,String num,String addrid);
	
	/**
	 * 结算购物车中的商品
	 * @param user
	 * @param ids
	 * @return
	 */
	public AppReturn buyCarGoods(Map<String, Object> user , String ids,String addrid);
	

//	/**
//	 * 生成订单
//	 * @param user
//	 * @param ids
//	 * @return
//	 */
//	public AppReturn createList(Map<String, Object> user , JSONObject goods);
	
	/**
	 * 生成订单
	 * @param user
	 * @param ids
	 * @return
	 */
	public AppReturn doCreateList(Map<String, Object> user, String goodsids,String stockids, String nums,String addrid);
	
	/**
	 * 修改购物车中的商品数量
	 * @param user
	 * @param id
	 * @param num
	 * @return
	 */
	public AppReturn upCar(Map<String, Object> user ,String id,String num);
	
	/**
	 * 删除购物车某条记录
	 * @param user
	 * @param id
	 * @return
	 */
	public AppReturn delCar(Map<String, Object> user ,String id);
	
	/**
	 * 获取邮费，总金额
	 * @param user
	 * @param goods
	 * @return
	 */
	public AppReturn getPostFee(Map<String, Object> user , JSONObject goods);
	
	/**
	 * 积分支付订单
	 * @param user
	 * @param listid
	 * @return
	 */
	public AppReturn doPayPoint(Map<String, Object> user , String listid);
	
	/**
	 * 执行预约
	 * @param user
	 * @param phone
	 * @param name
	 * @param day
	 * @param yytime
	 * @param goodsid
	 * @return
	 */
	public AppReturn doShopJoin(Map<String, Object> user,String phone,String name,String addr,String goodsid,String dkpzurl);
	
	/**
	 * 查询活动列表
	 * @param user
	 * @return
	 */
	public List<Map<String, Object>> getActivity(Map<String, Object> user);
	
	/**
	 * 查询活动详情
	 * @param user
	 * @param id
	 * @return
	 */
	public Map<String, Object> getActivityDetail(Map<String, Object> user,String id);
	

	/**
	 * 查询知识列表
	 * @param user
	 * @return
	 */
	public List<Map<String, Object>> getKnowledge(Map<String, Object> user);
	

	/**
	 * 查询知识详情
	 * @param user
	 * @return
	 */
	public Map<String, Object> getKnowledgeDetail(Map<String, Object> user,String id);
}
